<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<form:form commandName="capitalFilter" cssClass="form-horizontal"
	role="form" onsubmit="return false;">



	<div class="form-group">
		<label class="col-sm-1 control-label no-padding-right"
			   for="projectName">投资方名</label>
		<div class="col-sm-5">
			<select name="projectName" class="form-control required"
					style="width: 100%" data-placeholder="请选择项目名"
					id="projectName">
				<option value="${capitalFilter.projectName }">${capitalFilter.projectName }</option>
				<option value="光阳蛋业永泰金蛋工程">光阳蛋业永泰金蛋工程</option>
				<option value="协昌制衣">协昌制衣</option>
				<option value="古建筑维护及修缮工程">古建筑维护及修缮工程</option>
				<option value="中国永泰国际功夫影视小镇文化旅游综合体">中国永泰国际功夫影视小镇文化旅游综合体</option>
				<option value="鹅去氧胆酸生物推广">鹅去氧胆酸生物推广</option>
				<option value="湖泰旅游开发">湖泰旅游开发</option>
				<option value="鳗鲡无公害养殖基地">鳗鲡无公害养殖基地</option>
				<option value="永泰东南医院">永泰东南医院</option>
				<option value="永盛同贸易服务">永盛同贸易服务</option>
				<option value="君山信息咨询服务">君山信息咨询服务</option>
				<option value="镇明祥荣农业">镇明祥荣农业</option>
				<option value="八仙过海旅游项目">八仙过海旅游项目</option>
				<option value="闽投抽水蓄能电站项目">闽投抽水蓄能电站项目</option>
				<option value="同安福寨旅游">同安福寨旅游</option>
				<option value="永泰智慧信息产业园(福州软件园永泰分园）">永泰智慧信息产业园(福州软件园永泰分园）</option>
				<option value="赤壁温泉森林康养小镇">赤壁温泉森林康养小镇</option>
				<option value="永泰国际健康颐养小镇">永泰国际健康颐养小镇</option>
				<option value="嵩口原乡旅游度假区">嵩口原乡旅游度假区</option>

			</select>
		</div>

		<label class="col-sm-1 control-label no-padding-right"
			for=totalInver>申报全额</label>
		<div class="col-sm-5">
			<input type="text" name="totalInver" id="totalInver"
				placeholder="请输入申报全额" value="${capitalFilter.totalInver}"
				class="form-control required">
		</div>
	</div>

	


	<div class="form-group">
		<label class="col-sm-1 control-label no-padding-right" for="taxproof">佐证材料</label>
		<input class="col-sm-5" type="file" id="fileupload" name="files"
			accept=".zip"></input> <br>

		<button class="col-sm-5 btn btn-large btn-primary" id="btn">上传</button>

		<input type="text" name="taxproof" id="taxproof"
			value="${capitalFilter.taxproof}" class="form-control "  
			style="display: none" />
		<input type="text" name="isaudit" id="isaudit"
			value="${capitalFilter.isaudit}" class="form-control "  style="display: none"
			 />

	</div>






	<form:hidden path="sysId" />
</form:form>
<script src="<s:url value="/assets/js/chosen.jquery.js"></s:url>"></script>
<script src="<s:url value="/assets/js/ajaxfileupload.js"></s:url>"></script>
<script src="<s:url value="/assets/js/jquery-ui.js"></s:url>"></script>

<div id="dialog" title="提示">
	<div class="progress progress-striped active">
		<div class="progress-bar progress-bar-success" role="progressbar"
			aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
			style="width: 100%;"></div>

	</div>
	<p>正在上传 请稍后……</p>
</div>

<script type="text/javascript">
	$('#editor1').ace_wysiwyg({
		toolbar : [ 'font', null, 'fontSize', null, {
			name : 'bold',
			className : 'btn-info'
		}, {
			name : 'italic',
			className : 'btn-info'
		}, {
			name : 'strikethrough',
			className : 'btn-info'
		}, {
			name : 'underline',
			className : 'btn-info'
		}, null, {
			name : 'createLink',
			className : 'btn-pink'
		}, {
			name : 'unlink',
			className : 'btn-pink'
		}, null, {
			name : 'insertImage',
			className : 'btn-success'
		}, null, 'foreColor', null, {
			name : 'undo',
			className : 'btn-grey'
		}, {
			name : 'redo',
			className : 'btn-grey'
		} ]
	});
	//settingOneCheckTreeParam('#deptRelation','#deptRelation','resourceTree','#resourceTree','#resourceContent','<s:url value="/modules/sys/dept/json"></s:url>','#deptLevel','${sysDept.sysId}');

	/* settingOneCheckTreeParam({
		inputObjKey : '#deptRelation',
		treeObjName : 'resourceTree',
		treeContentKey : '#resourceContent',
	url : '<s:url value="/modules/sys/dept/json"></s:url>',
	levelKey : '#deptLevelForm',
	sysId : '${QuestionBank.sysId}'
	}); */

	$("#dialog").hide();
	$("#btn").click(function() {
		var fileval = $("#fileupload").val();
		if (fileval == null || fileval == "") {
			//alert("未选择任何文件");
            $(".shade").fadeIn(100);
            $(".warning").fadeIn(100);
            showShade();
            //警告框自定义内容
            $('.warning>.cont').html('未选择任何文件');
			return;
		}

		$("#dialog").show();
		$("#dialog").dialog();
		$.ajaxFileUpload({
			type : "post",
			fileElementId : "fileupload",
			secureuri : false,
			dataType : 'json',
			url : "/pictureUpload/uploadBatch",
			async : false,
			success : function(data) {
				var val = data.data.sysid;
				console.log(val);
				$("#taxproof").attr("value", val);
				$("#dialog").dialog("close");
				alert("成功");
			},
			error : function(data) {
				$("#dialog").dialog("close");
				alert("佐证材料上传失败 ！！请联系管理员");
			}

		});

	});
	var isauditval = $("#isaudit").val();
	console.log(isauditval);
	if(isauditval=='1'){
		$("#updatebtn").attr("disabled", true);
		console.log(isauditval+"111");
	}
	
	function findtwoClass() {
		var teamID = $("#teamClass").val();
		//alert(teamID);
		var teamcla = {
			"teamId" : teamID
		};
		$.ajax({
			url : "/chart/show/getTeamclassNames",
			dataType : "json", //返回数据形式为json
			type : "POST",
			contentType : 'application/json;charset=UTF-8',
			data : JSON.stringify(teamcla),
			success : function(data) {
				$("#teamname option").remove();
				$("#teamname").append(" <option value='00'>请选择</option>");
				for (var i = 0; i < data.data.length; i++) {
					var teamid = data.data[i].teamId;
					var teamname = data.data[i].teamName;
					$("#teamname").append(
							"<option value='"+teamname+"'>" + teamname
									+ "</option>");
					console.log(teamname);
				}
			}
		});

	}
</script>
